summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-05-18 22:07:48 +0200
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-07-21 16:56:07 +0200
commitf055f2dcf40580b6f1e9e0394ef401da5e332a75 (patch)
tree836678d484659bff1ee69629af82072956d662ac
parentshared_widget: Refactor helpers (diff)
downloadyuzu-f055f2dcf40580b6f1e9e0394ef401da5e332a75.tar
yuzu-f055f2dcf40580b6f1e9e0394ef401da5e332a75.tar.gz
yuzu-f055f2dcf40580b6f1e9e0394ef401da5e332a75.tar.bz2
yuzu-f055f2dcf40580b6f1e9e0394ef401da5e332a75.tar.lz
yuzu-f055f2dcf40580b6f1e9e0394ef401da5e332a75.tar.xz
yuzu-f055f2dcf40580b6f1e9e0394ef401da5e332a75.tar.zst
yuzu-f055f2dcf40580b6f1e9e0394ef401da5e332a75.zip
-rw-r--r--src/yuzu/configuration/shared_widget.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp
index 3ef2c25c6..f39e3fccb 100644
--- a/src/yuzu/configuration/shared_widget.cpp
+++ b/src/yuzu/configuration/shared_widget.cpp
@@ -26,7 +26,7 @@ namespace ConfigurationShared {
QPushButton* Widget::CreateRestoreGlobalButton(Settings::BasicSetting& setting, QWidget* parent) {
QStyle* style = parent->style();
- QIcon* icon = new QIcon(style->standardIcon(QStyle::SP_DialogResetButton));
+ QIcon* icon = new QIcon(style->standardIcon(QStyle::SP_LineEditClearButton));
QPushButton* restore_button = new QPushButton(*icon, QStringLiteral(""), parent);
restore_button->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
@@ -271,7 +271,7 @@ void Widget::CreateSlider(const QString& label, bool reversed, float multiplier,
restore_button->setVisible(false);
});
- QObject::connect(slider, &QAbstractSlider::sliderMoved, [=](int) {
+ QObject::connect(slider, &QAbstractSlider::valueChanged, [=]() {
restore_button->setEnabled(true);
restore_button->setVisible(true);
});
@@ -461,8 +461,7 @@ void Widget::CreateDateTimeEdit(const QString& label, std::function<void()>& loa
return;
}
- other_setting->LoadString(
- std::to_string(date_time_edit->dateTime().toSecsSinceEpoch()));
+ setting.LoadString(std::to_string(date_time_edit->dateTime().toSecsSinceEpoch()));
};
} else {
if (!has_checkbox) {
@@ -473,7 +472,7 @@ void Widget::CreateDateTimeEdit(const QString& label, std::function<void()>& loa
auto get_clear_val = [=]() {
return QDateTime::fromSecsSinceEpoch([=]() {
if (restrict && checkbox->checkState() == Qt::Checked) {
- return std::stoll(other_setting->ToStringGlobal());
+ return std::stoll(setting.ToStringGlobal());
}
return current_time;
}());
@@ -498,8 +497,7 @@ void Widget::CreateDateTimeEdit(const QString& label, std::function<void()>& loa
const bool using_global = !restore_button->isEnabled();
other_setting->SetGlobal(using_global);
if (!using_global) {
- other_setting->LoadString(
- std::to_string(date_time_edit->dateTime().toSecsSinceEpoch()));
+ setting.LoadString(std::to_string(date_time_edit->dateTime().toSecsSinceEpoch()));
}
};
}